<!--#include file="./top.asp"-->

<%
	dim rs_rpt_pe, str_rpt_pe
	set rs_rpt_pe = server.CreateObject("Adodb.Recordset")
	str_rpt_pe = "select * from rpt_pe where stu_id = '" & request.QueryString("stu_id") & "'"
	rs_rpt_pe.open str_rpt_pe, conn, 1, 3
	
	if rs_rpt_pe.eof then
		rs_rpt_pe.addnew
		rs_rpt_pe.fields("stu_id") = request.QueryString("stu_id")
		rs_rpt_pe.update
		rs_rpt_pe.close
		rs_rpt_pe.open str_rpt_pe, conn, 1, 3
	end if
	
	for i = 1 to rs_rpt_pe.fields.count - 1
		rs_rpt_pe.fields(i) = request.Form("rs_rpt_pe_" & i)
	next
	rs_rpt_pe.update
%>

</body>
</html>
<%
rs_rpt_pe.close
set rs_rpt_pe = nothing
call CloseConn()
response.Redirect("./rpt_pe.asp?stu_id=" & request.QueryString("stu_id"))
%>